$( document ).ready(function(){
	
	// encounter manager object -nm
	var encMgr = undefined;
	
	// list of keyboard key values with boolean to represent whether the
	// key is currently pressed -nm
	var keyMap = { 16: false, 17: false, 69: false };
	
	// bind click event to 'new encounter' button -nm
	$( '#new-enc' ).bind( 'click', function(){
		
		// create new EncManager object -nm
		encMgr = new EncManager();
		
		// debug -nm
		console.log( encMgr );
	
	} );
	
	// bind shortcut keys to events -nm
	$( document ).keydown( function( e ){ // on any key press -nm
		
		// if we find the key in our key map -nm
		if ( e.keyCode in keyMap ){ 
			
			// set the 'pressed' value to true -nm
			keyMap[ e.keyCode ] = true;
			
			// 'Ctrl' + 'Shift' + 'E' triggers new encounter button -nm
			if ( keyMap[ 16 ] && keyMap[ 17 ] && keyMap[ 69 ] ){ 

				// trigger click event on new encounter button -nm
				$( '#new-enc' ).trigger( 'click' );
				
				// debug -nm
				console.log( encMgr );
			}

		}

	} ).keyup( function( e ){ // when key is released -nm
		
		// if we find the key in our key map -nm
		if ( e.keyCode in keyMap ){
		
			// set the 'pressed' value to false -nm
			keyMap[ e.keyCode ] = false;
		}

	} );
	
});


